﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WcfContrib.Helpers;

namespace WcfContrib
{
    static class Constants
    {
        #region Namespaces
        internal const string ServiceContractNamespace = "http://wcfcontrib/ns/services";
        internal const string DataContractNamespace = "http://wcfcontrib/ns/contracts";
        internal const string FaultsNamespace = "http://wcfcontrib/ns/faults";
        #endregion

        #region Logging
        const string EventLogNameKey = "WcfContrib.Logging.EventLogName";
        const string EventSourceKey = "WcfContrib.Logging.EventSource";

        internal static readonly string DefaultEventLogName = "Application";
        internal static readonly string DefaultEventSource = "WcfContrib Logging";
        #endregion

        #region WindowsAuthroziationManager
        internal static readonly bool WindowsAuthorizationEnableCaching = true;
        internal static readonly bool WindowsAuthorizationIsEnabled = true;
        internal static readonly bool WindowsAuthorizationHandleRoles = true;
        internal static readonly bool WindowsAuthorizationDenyWhenUnmatched = false;
        internal static readonly bool WindowsAuthorizationProcessActionToOperationName = true;
        internal static readonly int WindowsAuthorizationCacheMaxEntriesCapacity = 1000;
        #endregion

        static Constants()
        {
            DefaultEventLogName = ConfigurationHelper.GetValue(EventLogNameKey, DefaultEventLogName);
            DefaultEventSource = ConfigurationHelper.GetValue(EventSourceKey, DefaultEventSource);
        }
    }
}
